﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


namespace DEMO_TEMP1
{
    public partial class MainMenu : Form
    {
        public MainMenu(bool ck_login,int checkmenu )
        {
            InitializeComponent();
            //imageList1 ImageBt = new ImageList();
            //button1.Parent = this;
           // this.label5.Text = "Log In";
            //Guid s = Guid.NewGuid();
            //MessageBox.Show(s.ToString());
            if (checkmenu==1)
            {
                //this.button1.Enabled = true;
                //this.button2.Enabled = true;
                this.pictureBox10.Visible = false;
                this.pictureBox10.Enabled = false;
                this.pictureBox3.Visible = true;
                this.pictureBox3.Enabled = true;
               // this.label3.Enabled = true;
                //this.button4.Enabled = true;
               // this.button5.Text = "Logout";
                this.pictureBox5.Visible = false;
                this.pictureBox5.Enabled = false;
                this.pictureBox7.Visible = true;
                this.pictureBox7.Enabled = true;
               // this.label5.Text = "Log out";
            }
            else if (checkmenu==2)
            {
                this.pictureBox1.Enabled = true;
                this.pictureBox2.Enabled = true;
                this.pictureBox3.Enabled = false;
                this.pictureBox4.Enabled = true;
                this.pictureBox1.Visible = true;
                this.pictureBox2.Visible = true;
                this.pictureBox3.Visible = false;
                this.pictureBox4.Visible = true;
                this.pictureBox8.Visible = false;
                this.pictureBox9.Visible = false;
                this.pictureBox10.Visible = true;
                this.pictureBox11.Visible = false;
                //this.label1.Enabled = true;
                //this.label2.Enabled = true;
                //this.label3.Enabled = true;
                //this.label4.Enabled = true;
                this.pictureBox5.Visible = false;
                this.pictureBox5.Enabled = false;
                this.pictureBox7.Visible = true;
                this.pictureBox7.Enabled = true;
               // this.label5.Text = "Log out";
               // this.button5.Text = "Logout";
            }
            else 
            {
                if (ck_login)
                {
                    this.Show();
                    
                }
               
               
                
            }
            
        }

        public void button5_Click(object sender, EventArgs e)
        {
            
           
            Login l = new Login();
            l.Show();
            DEMO_TEMP1.MainMenu m = new MainMenu(false,0);
         //   m.button5.Text = "Logout";
            //Dispose();
         //   button1
            

            
        }

        public void button6_Click(object sender, EventArgs e)
        {

            Application.Exit();
            
        }

        //private void button4_Click(object sender, EventArgs e)
        //{
        //    Demo_HHT_EARTH.Closeflight closeF = new Demo_HHT_EARTH.Closeflight();
        //    closeF.Show();

        //}

        //private void button3_Click(object sender, EventArgs e)
        //{
            
        //    Demo_HHT_EARTH.DLflight dlf = new Demo_HHT_EARTH.DLflight();
        //    dlf.Show();
           
           
        //}

        //private void button1_Click(object sender, EventArgs e)
        //{
        //    //Demo_HHT_EARTH.EMcheckin EM1 = new Demo_HHT_EARTH.EMcheckin();
        //    //EM1.Show();
        //    Demo_HHT_EARTH.EMcheckInGroup EMG = new Demo_HHT_EARTH.EMcheckInGroup("");
        //    EMG.Show();
           
        //}


       


        //private void button2_Click(object sender, EventArgs e)
        //{
        //    Demo_HHT_EARTH.EQcheckin EQ = new Demo_HHT_EARTH.EQcheckin("");
        //    EQ.Show();
          
        //}

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Demo_HHT_EARTH.EMcheckInGroup EMG = new Demo_HHT_EARTH.EMcheckInGroup("");
            EMG.Show();
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            Demo_HHT_EARTH.EQcheckin EQ = new Demo_HHT_EARTH.EQcheckin("");
            EQ.Show();
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            Demo_HHT_EARTH.DLflight dlf = new Demo_HHT_EARTH.DLflight();
            dlf.Show();
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            Demo_HHT_EARTH.Closeflight closeF = new Demo_HHT_EARTH.Closeflight();
            closeF.Show();

        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            
            Login l = new Login();
            l.Show();
            DEMO_TEMP1.MainMenu m = new MainMenu(false,0);
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void pictureBox7_Click(object sender, EventArgs e)
        {
            this.pictureBox5.Visible = true;
            this.pictureBox5.Enabled = true;
            Login l = new Login();
            l.Show();
            DEMO_TEMP1.MainMenu m = new MainMenu(false, 0);
        }

    }
}